program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x1, y1, r, x0, y0: Integer;
  a1, b1, c1, a2, b2, c2: real;
  dx, dy, d: real;

begin
  Writeln('enter x1, y1');
  readln(x1, y1);
  Writeln('enter r');
  Readln(r);
  Writeln ('enter x0, y0');
  Readln(x0, y0);
  dx:=x1-x0;
  dy:=y1-y0;
  d:=dx*dx+dy*dy;
  if (Sqrt(dx*dx+dy*dy)<=r) then
    writeln('It is so bad');
  if (Sqrt(dx*dx+dy*dy)>r) then
  begin
    a1:=(r*dx-dy*sqrt(d-r*r))/d;
    b1:=(r*dy+dx*sqrt(d-r*r))/d;
    c1:=-a1*x0-b1*y0;
    a2:=(r*dx+dy*sqrt(d-r*r))/d;
    b2:=(r*dy-dx*sqrt(d-r*r))/d;
    c2:=-a2*x0-b2*y0;
    Writeln('a1= ', a1:0:3, '   b1= ', b1:0:3, '   c1= ', c1:0:3);
    Writeln('a2= ', a2:0:3, '   b2= ', b2:0:3, '   c2= ', c2:0:3);
  end;
  Readln;
end.
